@extends('../layouts.base')  

@section('content')
<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
		<span class="c-gray en">&gt;</span>
		优惠码管理
		<span class="c-gray en">&gt;</span>
		发放列表 <a class="btn btn-primary radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="Hui-article">
		<article class="cl pd-20">
			
			<div>
				<form method="get" action="/coupon/list/index">
					优惠码:<input type="text" class="input-text" style="width:120px" placeholder="输入优惠码" id="coupon_code" name="coupon_code">
					 有效日期：
					<input name="start_time" type="text" onclick="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" id="datemin" class="input-text Wdate" style="width:120px;">
					-
					<input name="end_time" type="text" onclick="WdatePicker()" id="datemax" class="input-text Wdate" style="width:120px;">
					
					<button type="submit" class="btn btn-primary" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
				</form>
			</div>
			<div class="cl pd-5 bg-1 bk-gray mt-20">
				<span class="l"> 
					<!--<a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>-->
					<!--<a href="/coupon/list/add" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i>添加</a>--> 
				</span>
			</div>
			<table class="table table-border table-bordered table-bg" >
				<thead>
					<tr>
						<th scope="col" colspan="7">使用列表</th>
					</tr>
					<tr class="text-c">
						<th width="25"><input type="checkbox" name="" value=""></th>
						<th width="40">ID</th>
						<th width="150">微信昵称</th>
						<th width="150">优惠码</th>
						<th width="150">金额</th>
						<th width="150">使用时间</th>
						<th width="100">操作</th>
					</tr>
				</thead>
				<tbody>
					
					@if($data['code'] == 1)		
					@foreach ($data['data'] as $item)
						<tr class="text-c">
							<td><input type="checkbox" value="1" name=""></td>
							<td>{{$item->id}}</td>
							<td>{{$item->nickName}}</td>
							<td>{{$item->coupon_code}}</td>
							<td>{{$item->money}}</td>
							<td>{{$item->created_at}}</td>
							<td class="td-manage">
								<a title="删除" href="javascript:;" onclick="admin_del(this,{{$item->id}},'/coupon/send/delete','/coupon/send/index')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
							</td>
						</tr>
					@endforeach	
									
					@else
						<tr>
							<td colspan="7" style="text-align: center;">{{$data['msg']}}</td>
						</tr>
					@endif					
					
					
				</tbody>
			</table>
			@if($data['data']->hasPages())
				<tfoot>
					<tr>
						<th colspan="7">
							{{ $data['data']->appends(request()->all())->links() }}
						</th>
					</tr>
				</tfoot>
			@endif
		</article>
	</div>
</section>
@endsection




@section('script')
<script type="text/javascript" src="/HadminPage/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript" src="/HadminPage/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="/HadminPage/lib/laypage/1.2/laypage.js"></script> 
	
<script type="text/javascript">
	
	
	
</script> 
@endsection







